import React, { Component } from 'react'
import { BrowserRouter, Route, Switch, Redirect } from 'react-router-dom'
import List from './views/List.js'
import Detail from './views/Detail.js'
export default class App extends Component {
  render() {
    return (
      <BrowserRouter>
        <Switch>
          <Route path="/list" component={List}/>
          <Route path="/detail" component={Detail}/>
          <Redirect from="/" to="/list" />
        </Switch>
      </BrowserRouter>
    )
  }
}